<template>
  <div style="margin-top:30px">
    <el-form ref="form" :model="form" label-width="80px">
      <el-row>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="所属仓库" prop="warehouseCode" style="margin-right:15px" label-width="120px">
              <el-input v-model="form.warehouseName"   style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="所属库区" style="margin-right:15px"  label-width="120px" prop="spaceCode">
              <el-input v-model="form.spaceName"   style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="库位编码" style="margin-right:15px"  label-width="120px" prop="serialNumber">
              <el-input v-model="form.serialNumber" placeholder="请输入库位编码" style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="库位类型" style="margin-right:15px"  label-width="120px" prop="locationType">

              <el-input v-model="form.locationTypeName"   style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="库位承载类型" style="margin-right:15px"  label-width="120px" prop="bearType">

              <el-input v-model="form.bearTypeName"   style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="上架动线号" style="margin-right:15px"  label-width="120px" prop="shelvesNumber">
              <el-input v-model="form.shelvesNumber" placeholder="请输入上架动线号" style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="拣货动线号" style="margin-right:15px"  label-width="120px" prop="pickNumber">
              <el-input v-model="form.pickNumber" placeholder="请输入拣货动线号" style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="盘点动线号" style="margin-right:15px"  label-width="120px" prop="inventoryNumber">
              <el-input v-model="form.inventoryNumber" placeholder="请输入盘点动线号" style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="混放策略" style="margin-right:15px"  label-width="120px" prop="storageStrategy">
              <el-input v-model="form.storageStrategyName"  style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="出入库锁" style="margin-right:15px"  label-width="120px" prop="ioLock">
              <el-input v-model="form.ioLockName"  style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="备注" style="margin-right:15px"  label-width="120px">
              <el-input v-model="form.remarks" placeholder="请输入备注" style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import Vue from 'vue'
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/index.css'
import { locationDetail} from '@/api/basicInfo'

Vue.use(VXETable)
export default {
  name: 'Child',
  props:{
    warehouseData:{
      type: Array,
      required: true
    },
    operationCode:{
      type: String,
      required: true
    },
    bearTypeData:{
      type: Array,
      required: true
    }
  },
  data() {
    return {
      form: {
        bearTypeName:'',                            //库位承载类型 ,
        code:'',                                //数据标识 ,
        inventoryNumber:'',                     //盘点动线号 ,
        ioLockName:'',                              //出入库锁 ,
        locationTypeName:'',                        //库位类型 ,
        name:'',                                //库位名称 ,
        pickNumber:'',                          //拣货动线号 ,
        remarks:'',                             //备注 ,
        serialNumber:'',                        //编码 ,
        shelvesNumber:'',                       //上架动线号 ,
        spaceName:'',                           //所属库区 ,
        status:'',                              //状态 ,
        storageStrategyName:'',                     //存放策略 ,
        total:'',                               //总数 ,
        warehouseName:'',                       //所属仓库
      }

    }
  },
  created() {
    this.getInfo()
  },
  methods: {
    // 获取页面信息
    getInfo() {
      locationDetail(this.operationCode).then(response => {
        this.form = response.data
      })
    }
  }
}
</script>
<style lang="scss" scoped>
    .dialog-footer {
        margin-top: 50px;
    }
</style>
